package org.geekbang.projects.injection.utils;

import org.geekbang.projects.injection.Component;
import org.geekbang.projects.injection.Service;
import org.geektimes.base.util.ReflectionUtils;

/**
*   
* @author : KangNing Hu
*/
public class CommonUtils {

	/**
	 * 判断是否是组件
	 * @param aClass
	 * @return
	 */
	public static boolean isComponent(Class aClass){
		return ReflectionUtils.isAnnotation(aClass , Component.class);
	}


	/**
	 * 判读是否是service
	 * @param aClass
	 * @return
	 */
	public static boolean isService(Class<?> aClass) {
		return aClass.isAnnotationPresent(Service.class);
	}
}
